<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播示例</title>
    <!-- 第一步： 引入轮播css -->
    <link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css">
    <!-- 第四步： css样式 -->
    <style>
        .swiper {
            width: 600px;
            height: 200px;
        }

        .swiper img {
            width: 600px;
            height: 200px;
        }
    </style>
</head>

<body>
    <!-- 第二步： 实现轮播html结构 -->
    <div class="swiper">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                <img src="https://img.alicdn.com/imgextra/i3/2053469401/O1CN01g8ituT2JJiCsKjmDz_!!2053469401.png"
                    alt="">
            </div>
            <div class="swiper-slide">
                <img src="https://img2.baidu.com/it/u=717979571,3244631707&fm=253&fmt=auto&app=138&f=JPEG?w=1280&h=400"
                    alt="">
            </div>
            <div class="swiper-slide">
                <img src="https://img1.baidu.com/it/u=1733684228,4177721799&fm=253&fmt=auto&app=138&f=JPEG?w=1200&h=500"
                    alt="">
            </div>
        </div>

    </div>

    <!-- 第一步： 引入轮播js -->
    <script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"></script>
    <script>
        // 第三步： 初始swiper
        new Swiper('.swiper', {
            loop: true, // 循环模式选项
            autoplay: { // 自动轮播
                delay: 1500
            },
        })        
    </script>
</body>

</html>